<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>大道CMS内容管理系统</title>
<link href="/dadaocms/Public/login/login.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/dadaocms/Public/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
function fleshVerify(type){ 
	//重载验证码
	var timenow = new Date().getTime();
	$('#verifyImg').attr("src", '__GROUP__/Login/verify/'+timenow);
}

$(function(){	
	//自动登陆
	var user = "{$user.name}";
	var autologin = function(){
		data = $("#login").serialize();		
		$.ajax({
			type:"POST",
			dataType:"json",
			url:$("#login").attr('action'),	
			data:data,
			success: function(json){
				console.debug(json);
				if(json.status){
					window.location.href = json.url;
				}
			}
		});
	}
	var dd = 3;
	var login_data = function(){
		$("#login_data").html(dd);
		dd--;
	}
	var pp;	
	if(user){
		$("#login_data").parent().show();	
		ll = setInterval(login_data,1000);
		$("#username,#pwd").css({background:"#f00"});
		pp = setInterval(autologin,3000);
	}
	$("#username,#pwd").click(function(){
		$("#username,#pwd").css({background:"#fff"});
		clearInterval(pp);
		$("#login_data").parent().hide();
	});
	
	
	
});
</script>
</head>
<body>
<div id="loginbox">
  <div id="login_header">
    <h1 class="login_logo"> <a href="http://www.yiwutong.net"><img src="/dadaocms/Public/login/login_logo.gif"></a> </h1>
    <div class="login_headerContent">
      <div class="navList">
        <ul>
          <li><a href="#">设为首页</a></li>
          <li><a href="#">网站首页</a></li>
          <li><a href="#">使用反馈</a></li>
          <li><a href="#">帮助</a></li>
        </ul>
      </div>
      <h2 class="login_title"><img src="/dadaocms/Public/login/login_title.gif"></h2>
    </div>
  </div>
  <div id="login_content">
    <div class="loginForm">
      <form method="post" action="__GROUP__/Login/checkLogin" id="login">
        <p>
          <label>用户名：</label>
          <input name="username" type="text" class="login_input" id="username" value="{$user.name}" size="20" autocomplete="off">
        </p>
        <p>
          <label>密码：</label>
          <input name="password" type="password" class="login_input" id="pwd" value="{$user.pwd}" size="20">
        </p>
        <?php if(!$user){?>
        <p>
          <label>验证码：</label>
          <input class="code" name="verify" type="text" size="5">
          <span><img id="verifyImg" src="__GROUP__/Login/verify/" onclick="fleshVerify()" border="0" alt="点击刷新验证码" style="cursor:pointer" align="absmiddle"></span> </p>
        <p>
          <label style="width:80px">记住密码：</label>
          <input name="jizhu" type="checkbox" id="jizhu" value="1" />
        </p>
        <?php }?>
        <div style="display:none;padding-bottom:10px;">你已经选择了记住密码， <span id="login_data" style="color:#f00;">3</span>  秒后自动登陆</div>
        <div class="login_bar">
          <input class="sub" type="submit" value="">
        </div>
      </form>
    </div>
    <div class="login_banner"><img src="/dadaocms/Public/login/login_banner.jpg"></div>
    <div class="login_main">
      <ul class="helpList">
        <!--
				<li><a href="#">如何使用本系统</a></li>
				<li><a href="#">如何安装申请账号？</a></li>
				<li><a href="#">忘记密码怎么办？</a></li>
				<li><a href="#">为什么登录失败？</a></li>
				-->
      </ul>
      <div class="login_inner">
        <p></p>
      </div>
    </div>
  </div>
  <div id="login_footer"> Copyright © 2013 大道CMS内容管理系统软件研发组  All Rights Reserved. </div>
</div>
</body>
</html>